package com.lipaluma.annotations.validations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.lipaluma.field.validator.Validator;
import com.lipaluma.field.validator.strategies.LengthStrategy;

@Documented
@Inherited
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Validate {

	Class<? extends Validator>[] customs() default {};
	
	boolean required() default false;

	boolean unique() default false;
	
	boolean notEmpty() default false;
	
	int length() default -1;

	LengthStrategy lengthStrategy() default LengthStrategy.EQUALS;
	
	String matches() default "";
	
	boolean constant() default false;
	
	String constantValue() default "";

	boolean constantSupplied() default false;
	
	String[] includedIn() default {};
	
	String[] excludedOf() default {};

	String[] contains() default {};

	String[] notContains() default {};

	boolean atLeastOne() default false;
	
	String startsWith() default "";
	
	String endsWith() default "";
	
	String[] notStartsWith() default {};

	String[] notEndsWith() default {};

}
